package com.sskj.base.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

public class MyBanksBean {

    private List<BankBean> userBanks;

    public List<BankBean> getUserBanks() {
        if (userBanks == null) {
            return new ArrayList<>();
        }
        return userBanks;
    }

    public void setUserBanks(List<BankBean> userBanks) {
        this.userBanks = userBanks;
    }

    public static class BankBean implements Parcelable {


        /**
         * id : 3685
         * uid : 3197
         * opening_id : 12
         * bank_address : 人民路支行
         * bank_account : 6226223002779034
         * bank_name : 小九
         * bank_default : 1
         * name_cn : 中国民生银行
         * img : https://zfuwl.oss-cn-shenzhen.aliyuncs.com/b021/Public/upload/Bank/bankimg/5c454b6056a49.png
         */

        private String id;
        private String uid;
        private String opening_id;
        private String bank_address;
        private String bank_account;
        private String bank_name;
        private String bank_default;
        private String name_cn;
        private String img;

        protected BankBean(Parcel in) {
            id = in.readString();
            uid = in.readString();
            opening_id = in.readString();
            bank_address = in.readString();
            bank_account = in.readString();
            bank_name = in.readString();
            bank_default = in.readString();
            name_cn = in.readString();
            img = in.readString();
        }

        public static final Creator<BankBean> CREATOR = new Creator<BankBean>() {
            @Override
            public BankBean createFromParcel(Parcel in) {
                return new BankBean(in);
            }

            @Override
            public BankBean[] newArray(int size) {
                return new BankBean[size];
            }
        };

        public String getId() {
            return id == null ? "" : id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getUid() {
            return uid == null ? "" : uid;
        }

        public void setUid(String uid) {
            this.uid = uid;
        }

        public String getOpening_id() {
            return opening_id == null ? "" : opening_id;
        }

        public void setOpening_id(String opening_id) {
            this.opening_id = opening_id;
        }

        public String getBank_address() {
            return bank_address == null ? "" : bank_address;
        }

        public void setBank_address(String bank_address) {
            this.bank_address = bank_address;
        }

        public String getBank_account() {
            return bank_account == null ? "" : bank_account;
        }

        public void setBank_account(String bank_account) {
            this.bank_account = bank_account;
        }

        public String getBank_name() {
            return bank_name == null ? "" : bank_name;
        }

        public void setBank_name(String bank_name) {
            this.bank_name = bank_name;
        }

        public String getBank_default() {
            return bank_default == null ? "" : bank_default;
        }

        public void setBank_default(String bank_default) {
            this.bank_default = bank_default;
        }

        public String getName_cn() {
            return name_cn == null ? "" : name_cn;
        }

        public void setName_cn(String name_cn) {
            this.name_cn = name_cn;
        }

        public String getImg() {
            return img == null ? "" : img;
        }

        public void setImg(String img) {
            this.img = img;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel parcel, int i) {
            parcel.writeString(id);
            parcel.writeString(uid);
            parcel.writeString(opening_id);
            parcel.writeString(bank_address);
            parcel.writeString(bank_account);
            parcel.writeString(bank_name);
            parcel.writeString(bank_default);
            parcel.writeString(name_cn);
            parcel.writeString(img);
        }
    }
}
